import java.util.Random;

public class Public {
    public static void func1(int[] arrays){
        for (int i = 0; i < arrays.length; i++) {
            arrays[i] = i;
        }
    }

    //逆序数组
    public static void func2(int[] arrays){
        for (int i = 0; i < arrays.length; i++) {
            arrays[i] = arrays.length - i;
        }
    }

    //随机数组
    public static void func3(int[] arrays){
        Random random = new Random();
        for (int i = 0; i < arrays.length; i++) {
            arrays[i] = random.nextInt(arrays.length);
        }
    }

    public static void swap(int[] arrays, int i, int j){
        int temp = arrays[i];
        arrays[i] = arrays[j];
        arrays[j] = temp;
    }
}
